# -*- coding: utf-8 -*-
"""
Created on Sat Jul  6 23:05:28 2019

@author: user
"""
import ccxt
bitmex = ccxt.bitmex({
    'proxies': {
        'http': 'http://127.0.0.1:1080',
        'https': 'https://127.0.0.1:1080'
    }
})
symbol = 'BTC/USD'
timeframe = '1m'
limit = 300
since = bitmex.milliseconds() - limit * 60 * 1000
params = {'partial': False}
data = bitmex.fetch_ohlcv(symbol, timeframe, since, 12*24, params)

